<?php

//防止恶意调用
if (!defined('IN_MOD'))
{
    die('Hacking attempt');
}

$act = moduleaqvarval('act', 'string');

// 下载文件
if($act == 'downloadfile')
{
	$article['downloadnumber'] = $article['downloadnumber'] ? $article['downloadnumber'] : 0;
	$article['downloadurl'] = $article['downloadurl'] ? $article['downloadurl'] : "/";
		
	// 修改数据
	$paradata = array();
	$paradata['downloadnumber'] = $article['downloadnumber'] + 1;
	updateparadata($paradata, $article['id'], "", 0, 0, 1);
	
	header("Location: ".$article['downloadurl']);
}
?>